/**
 * 
 */
package com.cqan.system.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.cqan.entity.pk.LongEntity;

/**
 * @Description TODO
 * @author wuhui
 * @date 2012-5-5上午9:41:53
 *
 */
@SuppressWarnings("serial")
@Entity
//表名与类名不相同时重新定义表名.
@Table(name = "TBL_ATTACHMENT")
//默认的缓存策略.
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Attachment extends LongEntity {

	private String contentType;
	
	private Date createTime;
	
	private boolean enabled;
	
	private String fileName;
	
	private String md5;
	
	private Long size;
	
	private Long uid;
	
	private String url;
	/**
	 * 下载频率
	 */
	private Integer frequency;
	
	/**
	 * 类型。0：头像，1：产品log,2:数据节点log,3：消息附件，4：其它
	 */
	private Integer attType;
	
	/**
	 * 类型。0：头像，1：产品log,2:数据节点log,3：消息附件，4：其它
	 */
	public Integer getAttType() {
		return attType;
	}

	public void setAttType(Integer attType) {
		this.attType = attType;
	}

	@Column(name="FREQUENCY")
	public Integer getFrequency() {
		return frequency;
	}

	public void setFrequency(Integer frequency) {
		this.frequency = frequency;
	}

	@Column(name="CONTENT_TYPE")
	public String getContentType() {
		return contentType;
	}

	@Column(name="CREATE_TIME")
	public Date getCreateTime() {
		return createTime;
	}

	@Column(name="FILE_NAME")
	public String getFileName() {
		return fileName;
	}

	@Column(name="MD5")
	public String getMd5() {
		return md5;
	}

	@Column(name="SIZE")
	public Long getSize() {
		return size;
	}

	@Column(name="UID")
	public Long getUid() {
		return uid;
	}

	@Column(name="URL")
	public String getUrl() {
		return url;
	}

	@Column(name="ENABLED")
	public boolean isEnabled() {
		return enabled;
	}

	public void setContentType(String contentType) {
		this.contentType = contentType;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public void setMd5(String md5) {
		this.md5 = md5;
	}

	public void setSize(Long size) {
		this.size = size;
	}

	public void setUid(Long uid) {
		this.uid = uid;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	
}
